<?php defined('InTuntronKJ') or exit('Access Invalid!');?>


      <!--crumbs start-->
      <div class="crumbs">
        <ul>
          <li><span class="strong">当前位置：</span></li>
          <li><a href="#LotteryHall">首页</a></li>
            <li><a href="#MemberManage&op=TeamRprofitloss">盈亏报表</a></li>
            <li><div id="li_hierarchy"></div></li>
        </ul>
        <div class="clear"></div>
      </div>
      <!--crumbs end--> 
      
      <!--list_main start-->
      <div class="list_main"> 
        <!--list_header start-->
        <div class="list_header"> 
          
         <!--list_nav start-->
          <div class="list_nav">
            <ul>
                <li><a href="#MemberManage">会员管理</a></li>
                <li><a href="#MemberManage&op=TeamGamerecord">游戏记录</a></li>
        		<li  class="current"><a href="#MemberManage&op=TeamRprofitloss">盈亏报表</a></li>
        		<li><a href="#MemberManage&op=TeamCoinAll">团队统计</a></li>
        		<li><a href="#MemberManage&op=TeamCoin">账变记录</a></li>
        		<li><a href="#MemberManage&op=TeamRecharge">充值记录</a></li>
        		<li><a href="#MemberManage&op=TeamCashRecord">提现记录</a></li>
        		<li><a href="#MemberManage&op=Links">推广链接</a></li>
            </ul>
            <div class="clear"></div>
          </div>
          <!--list_nav end-->
          
          <!--list_sort start-->
            <div class="list_sort">
            	<div class="tnsi_sub tnsis_label" style="float:left">
                	<div class="base_select">
	                    <select id="selectType">
	                        <option value="0">所有人</option>
	                        <option value="1">我自己</option>
	                        <option value="2">直属下线</option>
	                        <option value="3">所有下线</option>
	                    </select>      
                    </div>          
            	</div>
                <div class="list_sort_item">
                    <div class="dc_sub dc_split"><span>用户名/昵称</span></div>
                </div>
                <div class="list_sort_item">
                    <div class="base_text bt_d">
                        <input type="text" id="NameOrNickName" value="" />
                    </div>
                </div>
                <div class="list_sort_item">
                    <div class="data_check">
                        <div class="dc_sub dc_split"><span>从</span></div>
                        <div class="dc_sub base_text">
                            <input type="text" class="datepicker" readonly="true" id="dateStart" value="2013-07-22" />
                        </div>
                        <div class="dc_sub dc_split"><span>至</span></div>
                        <div class="dc_sub base_text">
                            <input type="text" class="datepicker" readonly="true" id="dateEnd" value="2013-07-22" />
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="list_sort_item">
                    <div class="base_button">
                        <button id="btnSearch">筛选</button>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
          <!--list_sort end--> 
          
        </div>
        <!--list_header end--> 
        
        <!--list_table satrt-->
        <div class="list_table">
          <table>
            <thead>
             <tr class="dark">
                <th style="width:40px;">序号</th>
                <th style="width:100px;">用户名</th>
                <th style="width:60px;">类型</th>
              	<th>充值总额</th>
                <th>提现总额</th>
                 <th>投注总额</th>
                 <th>中奖总额</th>
                 <th>返点总额</th>
                 <th>实际盈亏</th>
              </tr>
            </thead>
              <tbody>
              	        <?php if(!empty($output['member_list']) && is_array($output['member_list'])){?>    
              			<?php foreach($output['member_list'] as $key=>$value){?>  
                           <tr data-id="1">
                               <td class="center"><span class="gry"><?php echo $key+1?></span></td>
                               <td class="center"><span class="base_orgen"><?php echo $value['username']?></span></a></td>
                               <td class="center"><span class="base_blue"><?php echo $value['type']==0?'会员':'代理' ?></span></td>
                               <td class="center"><span class="base_blue"><?php echo $value['rechargeAmount']?$value['rechargeAmount']:'--' ?></span></td>
                               <td class="center"><span class="base_blue"><?php echo $value['cashAmount']?$value['cashAmount']:'--' ?></span></td>
                               <td class="center"><span class="base_blue"><?php echo $value['betAmount']?$value['betAmount']:'--' ?></span></td>
                               <td class="center"><span class="base_blue"><?php echo $value['zjAmount']?$value['zjAmount']:'--' ?></span></td>
                               <td class="center"><span class="base_blue"><?php echo $value['fanDianAmount']?number_format($value['fanDianAmount'],2):'--' ?></span></td>
                               <td class="center"><span class="base_blue"><?php echo number_format($value['zjAmount']-$value['betAmount']+$value['fanDianAmount'],2) ?></span></td>                               
                           </tr>
                         <?php }?>
                         <?php }else{?>
                           <tr>
	                          <td colspan="9">
	                          <!--no_result start-->
	                          <div class="no_result list_null">
	                                  <div class="nr_icon">&nbsp;</div>
	                                  <div class="nr_info">
	                                    <h4>没有记录可以显示！</h4>
	                                    <p>没有找到您的所查询的记录，请修改您的查询条件重新查找~</p>
	                                  </div>
	                                </div>
	                            <!--no_result end-->
	                        </td>
                    	</tr>
                    	<?php }?>
              </tbody>
              <!--  
              <?php if(!empty($output['member_list']) && is_array($output['member_list'])){?>  
            <tfoot>
                            <tr>
                            <td class="center" colspan="3"><span>本页合计</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"></td>
                            </tr>
                            <tr>
                            <td class="center" colspan="3"><span>总合计</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"><span class="base_blue">0.00</span></td>
                            <td class="center"></td>
                            </tr>
            </tfoot>
            <?php }?>
            -->
          </table>
        </div>
        <!--list_table end--> 
        
        <!--page_nav start-->
        <div class="page_nav">
          <ul>
            <li><a page_index ="1"  page_change="0" class ="GetDataByPageIndex" href="javascript:">首页</a></li>
            <li><a page_index ="<?php echo $output['page']?>" page_change="-1" class ="GetDataByPageIndex" href="javascript:">上一页</a></li>
            <li><a page_index ="<?php echo $output['page']?>" page_change="1" <?php if($output['page'] != $output['totalpage']){?>class ="GetDataByPageIndex" <?php }?> href="javascript:">下一页</a></li>
            <li><a page_index ="<?php echo $output['totalpage']?>" page_change="0" class ="GetDataByPageIndex" href="javascript:">最后页</a></li>
              <li><span>第
                  <?php echo $output['page']?>
                      /
                  <?php echo $output['totalpage']?>    
                  页</span></li>
              <li><span>共
                      <?php echo $output['count']?> 
                      条记录</span></li>
              <li><a page_index ="<?php echo $output['page']?>" page_change="0" class ="GetDataByPageIndex" href="javascript:">刷新</a></li>
          </ul>
          <div class="clear"></div>
        </div>
        <!--page_nav end-->  
        
      </div>
      <!--list_main end-->

<script type="text/javascript">
	var userprofitloss_BeginDate = "<?php echo $output['param']['beginDate'] ?>";
	var userprofitloss_EndDate = "<?php echo $output['param']['endDate'] ?>";
	var userprofitloss_NameOrNickName = "<?php echo $output['param']['nickname'] ?>";
	var userprofitloss_Type = "<?php echo $output['param']['type'] ?>";
	var userprofitloss_username = "<?php echo $output['param']['username'] ?>";
	init_teamprofitlosslist();
</script>